home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Clinical Endocrinology
/
Clinical Endocrinology.iso
/
pc
/
00000000
/
21000000
/
21090000
/
shared.dir
/
00908_Script_908
< prev
next >
Wrap
Text File
|
1995-11-17
|
1KB
|
34 lines
-- This is an all-purpose handler which, when called
-- checks to see if the sprite in the specified channel
-- is being rolled over. If it is being rolled over,
-- then its cast member is swopped for the next in the
-- cast window. The stage is redrawn to show the change
-- and this state is maintained while the mouse is over
-- the same sprite channel. An "if...then" loop in the
-- repeat loop checks to see if the mouse button is
-- clicked, and if so, sound is played, the playback
-- head is moved to a specified label and the handler
-- is aborted. If the mouse button is not clicked then
-- when the mouse moves off the specified sprite the
-- original cast member is swopped back and the screen
-- is redrawn.
on flashButton theChannel, theScriptToDo
put the castNum of sprite theChannel into theCast
repeat while rollOver(theChannel) = true
set the castNum of sprite theChannel = theCast + 1
updateStage
if the mouseDown then
sound playFile 1, "Click.aif"
do theScriptToDo
abort
end if
end repeat
set the castNum of sprite theChannel = theCast
updateStage
end flashButton